package com.example.course.mapper;

import com.example.course.bean.Course;
import com.example.course.bean.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseMapper {
    List<Course> selectCourse();
    int updateCourse(Course course);
    int deleteCourse(int id);
    int insertCourse(Course course);
    int insertCourseById(@Param("teacherId") int TeacherId,@Param("courseId") int courseId);
    List<Course> selectCourseByTeacherId(int TeacherId);
    List<Student> selectCourseByTime(@Param("time") String time, @Param("id") int id);
    Course selectCourseById(int id);
    List<Course> selectCourseByTimeAndBeginTimeOrEndTime(@Param("time") String time, @Param("id") int id, @Param("beginTime") String beginTime, @Param("endTime") String endTime);
    List<Course> selectCourseByStudentId(int studentId);
    int selectCourseNumberById(int id);
    int updateCourseNumberById(@Param("id") int id,@Param("number") int number);
    int deleteCourseStudent(int id);
    int deleteCourseTeacher(int id);
    List<Object> selectStudentByCourseId(int CourseId);
    List<Object> selectTeacherByCourseId(int CourseId);

}
